package com.my.spvideo.dao.mysql.baidumv;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.my.spvideo.vo.ChannelIncomStat;
import com.my.spvideo.vo.Channelincom;
import com.my.spvideo.vo.OrderStat;


public interface ChannelincomMapper {
	

	List<String> selectChannels();
	
	List<Channelincom> selectChannelId(@Param("channelId") String channelId,@Param("businessId") int businessId);
	
	/**
	 * 初次展示
	 * 
	 * @param startNum
	 * @param pageSize
	 * @return`
	 */
	public List<Channelincom> getChannelincomlist(@Param("startNum") int startNum,
			@Param("pageSize") int pageSize,@Param("startTime") String startTime,
			@Param("endTime") String endTime,@Param("channelId") String channelId,
			@Param("companyId") String companyId,@Param("businessLeader") String businessLeader);
	
	/**
	 * 数量
	 * 
	 * @return
	 */
	public int getChannelincomlistCount(@Param("startTime") String startTime,
			@Param("endTime") String endTime,@Param("channelId") String channelId,
			@Param("companyId") String companyId,@Param("businessLeader") String businessLeader);

	
	/**
	 * 总计
	 * 
	 * @return
	 */
	public List<Channelincom> getChannelincomlistSum(@Param("startTime") String startTime,
			@Param("endTime") String endTime,@Param("channelId") String channelId,
			@Param("companyId") String companyId,@Param("businessLeader") String businessLeader);
	
	/**
	 * 添加信息cpa
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int insertChannelincom(@Param("Channelincom") Channelincom channelincom);
	
	/**
	 * 添加信息cps
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int insertChannelincomCps(@Param("Channelincom") Channelincom channelincom);	
	
	
	/**
	 * 删除信息
	 * 
	 * @param id
	 * @return
	 */
	public int deleteChannel(int id);
	/**
	 * 更新信息
	 * 
	 * @param cps
	 * @return
	 */
	public int updateChannelincomCps(@Param("Channelincom") Channelincom channelincom);

	/**
	 * 查询数据类型
	 */
	public int selectDateType(@Param("channelId") String channelId);
	
	
	/**
	 * 更新信息
	 * 
	 * @param cps
	 * @return
	 */
	public int updateChannelincomCpa(@Param("Channelincom") Channelincom channelincom);
	

	Channelincom selectChanne(int id);

	
	List<ChannelIncomStat> channelIncomStat(@Param("startTime")String startTime,@Param("endTime")String endTime,int companyId);
	
	/**
	 * 初次展示(给渠道看)
	 * 
	 * @param startNum
	 * @param pageSize
	 * @return
	 */
	public List<Channelincom> getChanneViewComlist(@Param("endTime") String endTime,@Param("channelId") String channelId,@Param("companyId") int companyId);
	
	/**
	 * 不选择渠道只选时间查询(给渠道看)
	 * 
	 * @return
	 */
	public List<Channelincom> getDateTypeTwoList(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("companyId") int companyId,@Param("channelId") String channelId);
	
	/**
	 * 不选择渠道只选时间查询(给渠道看)
	 * 
	 * @return
	 */
	public List<OrderStat> getDateTypeOneList(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("companyId") int companyId,@Param("channelId") String channelId);
	
}
